3.34 \(\int \frac {d+\frac {e}{x}}{c+\frac {a}{x^2}} \, dx\)

Optimal. Leaf size=49 \[ -\frac {\sqrt {a} d \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{c^{3/2}}+\frac {e \log \left (a+c x^2\right )}{2 c}+\frac {d x}{c} \]

[Out]

d*x/c+1/2*e*ln(c*x^2+a)/c-d*arctan(x*c^(1/2)/a^(1/2))*a^(1/2)/c^(3/2)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {1394, 774, 635, 205, 260} \[ -\frac {\sqrt {a} d \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{c^{3/2}}+\frac {e \log \left (a+c x^2\right )}{2 c}+\frac {d x}{c} \]

Antiderivative was successfully verified.

[In]

Int[(d + e/x)/(c + a/x^2),x]

[Out]

(d*x)/c - (Sqrt[a]*d*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/c^(3/2) + (e*Log[a + c*x^2])/(2*c)

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 774

Int[(((d_.) + (e_.)*(x_))*((f_) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(e*g*x)/c, x] + Dist[1
/c, Int[(c*d*f - a*e*g + c*(e*f + d*g)*x)/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x]

Rule 1394

Int[((a_) + (c_.)*(x_)^(n2_.))^(p_.)*((d_) + (e_.)*(x_)^(n_))^(q_.), x_Symbol] :> Int[x^(n*(2*p + q))*(e + d/x
^n)^q*(c + a/x^(2*n))^p, x] /; FreeQ[{a, c, d, e, n}, x] && EqQ[n2, 2*n] && IntegersQ[p, q] && NegQ[n]

Rubi steps

\begin {align*} \int \frac {d+\frac {e}{x}}{c+\frac {a}{x^2}} \, dx &=\int \frac {x (e+d x)}{a+c x^2} \, dx\\ &=\frac {d x}{c}+\frac {\int \frac {-a d+c e x}{a+c x^2} \, dx}{c}\\ &=\frac {d x}{c}-\frac {(a d) \int \frac {1}{a+c x^2} \, dx}{c}+e \int \frac {x}{a+c x^2} \, dx\\ &=\frac {d x}{c}-\frac {\sqrt {a} d \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{c^{3/2}}+\frac {e \log \left (a+c x^2\right )}{2 c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 49, normalized size = 1.00 \[ -\frac {\sqrt {a} d \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{c^{3/2}}+\frac {e \log \left (a+c x^2\right )}{2 c}+\frac {d x}{c} \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e/x)/(c + a/x^2),x]

[Out]

(d*x)/c - (Sqrt[a]*d*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/c^(3/2) + (e*Log[a + c*x^2])/(2*c)

________________________________________________________________________________________

fricas [A]  time = 0.88, size = 108, normalized size = 2.20 \[ \left [\frac {d \sqrt {-\frac {a}{c}} \log \left (\frac {c x^{2} - 2 \, c x \sqrt {-\frac {a}{c}} - a}{c x^{2} + a}\right ) + 2 \, d x + e \log \left (c x^{2} + a\right )}{2 \, c}, -\frac {2 \, d \sqrt {\frac {a}{c}} \arctan \left (\frac {c x \sqrt {\frac {a}{c}}}{a}\right ) - 2 \, d x - e \log \left (c x^{2} + a\right )}{2 \, c}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e/x)/(c+a/x^2),x, algorithm="fricas")

[Out]

[1/2*(d*sqrt(-a/c)*log((c*x^2 - 2*c*x*sqrt(-a/c) - a)/(c*x^2 + a)) + 2*d*x + e*log(c*x^2 + a))/c, -1/2*(2*d*sq
rt(a/c)*arctan(c*x*sqrt(a/c)/a) - 2*d*x - e*log(c*x^2 + a))/c]

________________________________________________________________________________________

giac [A]  time = 0.27, size = 43, normalized size = 0.88 \[ -\frac {a d \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c} c} + \frac {d x}{c} + \frac {e \log \left (c x^{2} + a\right )}{2 \, c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e/x)/(c+a/x^2),x, algorithm="giac")

[Out]

-a*d*arctan(c*x/sqrt(a*c))/(sqrt(a*c)*c) + d*x/c + 1/2*e*log(c*x^2 + a)/c

________________________________________________________________________________________

maple [A]  time = 0.01, size = 43, normalized size = 0.88 \[ -\frac {a d \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c}\, c}+\frac {d x}{c}+\frac {e \ln \left (c \,x^{2}+a \right )}{2 c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d+e/x)/(c+a/x^2),x)

[Out]

d*x/c+1/2*e*ln(c*x^2+a)/c-1/c*a*d/(a*c)^(1/2)*arctan(c*x/(a*c)^(1/2))

________________________________________________________________________________________

maxima [A]  time = 1.62, size = 42, normalized size = 0.86 \[ -\frac {a d \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c} c} + \frac {d x}{c} + \frac {e \log \left (c x^{2} + a\right )}{2 \, c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e/x)/(c+a/x^2),x, algorithm="maxima")

[Out]

-a*d*arctan(c*x/sqrt(a*c))/(sqrt(a*c)*c) + d*x/c + 1/2*e*log(c*x^2 + a)/c

________________________________________________________________________________________

mupad [B]  time = 1.59, size = 39, normalized size = 0.80 \[ \frac {e\,\ln \left (c\,x^2+a\right )}{2\,c}+\frac {d\,x}{c}-\frac {\sqrt {a}\,d\,\mathrm {atan}\left (\frac {\sqrt {c}\,x}{\sqrt {a}}\right )}{c^{3/2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d + e/x)/(c + a/x^2),x)

[Out]

(e*log(a + c*x^2))/(2*c) + (d*x)/c - (a^(1/2)*d*atan((c^(1/2)*x)/a^(1/2)))/c^(3/2)

________________________________________________________________________________________

sympy [B]  time = 0.28, size = 112, normalized size = 2.29 \[ \left (\frac {e}{2 c} - \frac {d \sqrt {- a c^{3}}}{2 c^{3}}\right ) \log {\left (x + \frac {- 2 c \left (\frac {e}{2 c} - \frac {d \sqrt {- a c^{3}}}{2 c^{3}}\right ) + e}{d} \right )} + \left (\frac {e}{2 c} + \frac {d \sqrt {- a c^{3}}}{2 c^{3}}\right ) \log {\left (x + \frac {- 2 c \left (\frac {e}{2 c} + \frac {d \sqrt {- a c^{3}}}{2 c^{3}}\right ) + e}{d} \right )} + \frac {d x}{c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e/x)/(c+a/x**2),x)

[Out]

(e/(2*c) - d*sqrt(-a*c**3)/(2*c**3))*log(x + (-2*c*(e/(2*c) - d*sqrt(-a*c**3)/(2*c**3)) + e)/d) + (e/(2*c) + d
*sqrt(-a*c**3)/(2*c**3))*log(x + (-2*c*(e/(2*c) + d*sqrt(-a*c**3)/(2*c**3)) + e)/d) + d*x/c

________________________________________________________________________________________